<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMgtUserGroupTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('mgt_user_group', function (Blueprint $table) {
            $table->bigInteger('id', true);
            $table->bigInteger('user_id')->nullable();
            $table->string('group_type', 45)->nullable();
            $table->string('group_value', 45)->nullable();
            $table->dateTime('create_time')->nullable()->useCurrent();
            $table->bigInteger('creator_id')->nullable()->default(0);
            $table->dateTime('update_time')->nullable()->useCurrent();
            $table->bigInteger('updater_id')->nullable()->default(0);
            $table->integer('deleted')->nullable()->default(0);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('mgt_user_group');
    }
};
